package com.klxedu.ms.gateway.core.json;

/**
 * 标准JSON结构对象，包含data、success及message属性，success默认为true
 * @author LiuHG
 * @version 1.0
 */
public class JsonSuccessObject<T> extends BaseJsonObject<T>{
	
	/**
	 * 用于返回成功的没有消息、没有数据的json对象，此对象仅允许返回使用，禁止进行属性的设置
	 */
	public static final JsonObject<Object> SUCCESS = new JsonSuccessObject<>();

	public JsonSuccessObject() {
		super(null);
	}
	
	public JsonSuccessObject(T data) {
		super(data,ResponesCode.SUCCESS);
	}
	
	public JsonSuccessObject(T data,String code) {
		super(data,code,null);
	}
	
	public JsonSuccessObject(T data,String code,String message) {
		super(data, code, message);
	}
}
